package net.edu_soft.ec.asset.pojo;

import java.util.ArrayList;
import java.util.List;

public class UserAffExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public UserAffExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andUserAffIdIsNull() {
            addCriterion("user_aff_id is null");
            return (Criteria) this;
        }

        public Criteria andUserAffIdIsNotNull() {
            addCriterion("user_aff_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserAffIdEqualTo(Integer value) {
            addCriterion("user_aff_id =", value, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdNotEqualTo(Integer value) {
            addCriterion("user_aff_id <>", value, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdGreaterThan(Integer value) {
            addCriterion("user_aff_id >", value, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_aff_id >=", value, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdLessThan(Integer value) {
            addCriterion("user_aff_id <", value, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_aff_id <=", value, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdIn(List<Integer> values) {
            addCriterion("user_aff_id in", values, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdNotIn(List<Integer> values) {
            addCriterion("user_aff_id not in", values, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdBetween(Integer value1, Integer value2) {
            addCriterion("user_aff_id between", value1, value2, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserAffIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_aff_id not between", value1, value2, "userAffId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdIsNull() {
            addCriterion("user_info_id is null");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdIsNotNull() {
            addCriterion("user_info_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdEqualTo(Integer value) {
            addCriterion("user_info_id =", value, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdNotEqualTo(Integer value) {
            addCriterion("user_info_id <>", value, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdGreaterThan(Integer value) {
            addCriterion("user_info_id >", value, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_info_id >=", value, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdLessThan(Integer value) {
            addCriterion("user_info_id <", value, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_info_id <=", value, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdIn(List<Integer> values) {
            addCriterion("user_info_id in", values, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdNotIn(List<Integer> values) {
            addCriterion("user_info_id not in", values, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdBetween(Integer value1, Integer value2) {
            addCriterion("user_info_id between", value1, value2, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andUserInfoIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_info_id not between", value1, value2, "userInfoId");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsIsNull() {
            addCriterion("factory_ids is null");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsIsNotNull() {
            addCriterion("factory_ids is not null");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsEqualTo(String value) {
            addCriterion("factory_ids =", value, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsNotEqualTo(String value) {
            addCriterion("factory_ids <>", value, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsGreaterThan(String value) {
            addCriterion("factory_ids >", value, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsGreaterThanOrEqualTo(String value) {
            addCriterion("factory_ids >=", value, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsLessThan(String value) {
            addCriterion("factory_ids <", value, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsLessThanOrEqualTo(String value) {
            addCriterion("factory_ids <=", value, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsLike(String value) {
            addCriterion("factory_ids like", value, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsNotLike(String value) {
            addCriterion("factory_ids not like", value, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsIn(List<String> values) {
            addCriterion("factory_ids in", values, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsNotIn(List<String> values) {
            addCriterion("factory_ids not in", values, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsBetween(String value1, String value2) {
            addCriterion("factory_ids between", value1, value2, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andFactoryIdsNotBetween(String value1, String value2) {
            addCriterion("factory_ids not between", value1, value2, "factoryIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsIsNull() {
            addCriterion("product_ids is null");
            return (Criteria) this;
        }

        public Criteria andProductIdsIsNotNull() {
            addCriterion("product_ids is not null");
            return (Criteria) this;
        }

        public Criteria andProductIdsEqualTo(String value) {
            addCriterion("product_ids =", value, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsNotEqualTo(String value) {
            addCriterion("product_ids <>", value, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsGreaterThan(String value) {
            addCriterion("product_ids >", value, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsGreaterThanOrEqualTo(String value) {
            addCriterion("product_ids >=", value, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsLessThan(String value) {
            addCriterion("product_ids <", value, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsLessThanOrEqualTo(String value) {
            addCriterion("product_ids <=", value, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsLike(String value) {
            addCriterion("product_ids like", value, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsNotLike(String value) {
            addCriterion("product_ids not like", value, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsIn(List<String> values) {
            addCriterion("product_ids in", values, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsNotIn(List<String> values) {
            addCriterion("product_ids not in", values, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsBetween(String value1, String value2) {
            addCriterion("product_ids between", value1, value2, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductIdsNotBetween(String value1, String value2) {
            addCriterion("product_ids not between", value1, value2, "productIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsIsNull() {
            addCriterion("product_type_ids is null");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsIsNotNull() {
            addCriterion("product_type_ids is not null");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsEqualTo(String value) {
            addCriterion("product_type_ids =", value, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsNotEqualTo(String value) {
            addCriterion("product_type_ids <>", value, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsGreaterThan(String value) {
            addCriterion("product_type_ids >", value, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsGreaterThanOrEqualTo(String value) {
            addCriterion("product_type_ids >=", value, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsLessThan(String value) {
            addCriterion("product_type_ids <", value, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsLessThanOrEqualTo(String value) {
            addCriterion("product_type_ids <=", value, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsLike(String value) {
            addCriterion("product_type_ids like", value, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsNotLike(String value) {
            addCriterion("product_type_ids not like", value, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsIn(List<String> values) {
            addCriterion("product_type_ids in", values, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsNotIn(List<String> values) {
            addCriterion("product_type_ids not in", values, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsBetween(String value1, String value2) {
            addCriterion("product_type_ids between", value1, value2, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andProductTypeIdsNotBetween(String value1, String value2) {
            addCriterion("product_type_ids not between", value1, value2, "productTypeIds");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}